﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls.UI;
using Cesave.DistributedServices.PermisosModule.WindowsHost.ViewModels.Catalogs.VariedadesGrupos;

namespace Cesave.DistributedServices.PermisosModule.WindowsHost.Views.Catalogs.VariedadesGrupos
{
    /// <summary>
    /// Vista del catálogo de grupos de variedades.
    /// </summary>
    public partial class VariedadesGruposView : Form
    {

        #region Private properties

        /// <summary>
        /// Modelo de la vista.
        /// </summary>
        private VariedadesGruposViewModel _model;

        #endregion

        #region Public properties

        /// <summary>
        /// Barra de espera.
        /// </summary>
        public RadWaitingBar WaitingBar
        {
            get
            {
                return waitingBar;
            }
        }

        #endregion

        #region Constructor

        /// <summary>
        /// Constructor
        /// </summary>
        public VariedadesGruposView()
        {
            InitializeComponent();
            _model = new VariedadesGruposViewModel(this);
        }

        #endregion

        #region Event methods

        /// <summary>
        /// Ocurre al iniciar la espera.
        /// </summary>
        private void WaitingStarted(object sender, EventArgs e)
        {
            waitingBar.Visible = true;
        }

        /// <summary>
        /// Ocurre al concluir la espera.
        /// </summary>
        private void WaitingEnded(object sender, EventArgs e)
        {
            waitingBar.Visible = false;
        }

        #endregion
    }
}
